package com.smart.coupon.template.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.math.BigDecimal;
import java.util.Date;
import lombok.Data;

/**
    * 优惠券模板表
    */
@Data
@TableName(value = "coupon_template")
public class CouponTemplate {
    /**
     * 优惠券模板ID
     */
    @TableId(value = "template_id", type = IdType.ASSIGN_ID)
    private Long templateId;

    /**
     * 优惠券名称
     */
    @TableField(value = "`name`")
    private String name;

    /**
     * 开始时间
     */
    @TableField(value = "start_time")
    private Date startTime;

    /**
     * 结束时间
     */
    @TableField(value = "end_time")
    private Date endTime;

    /**
     * 优惠金额
     */
    @TableField(value = "amount")
    private BigDecimal amount;

    /**
     * 1 表示激活  0 表示禁用
     */
    @TableField(value = "active")
    private Integer active;

    /**
     * logo
     */
    @TableField(value = "logo")
    private String logo;

    /**
     * 说明
     */
    @TableField(value = "description")
    private String description;

    /**
     * 1 表示 未过期 0 表示已过期
     */
    @TableField(value = "EXPIRE")
    private Integer expire;

    /**
     * 创建用户ID
     */
    @TableField(value = "user_id")
    private Long userId;

    /**
     * 优惠券规则
     */
    @TableField(value = "`rule`")
    private String rule;

    public static final String COL_TEMPLATE_ID = "template_id";

    public static final String COL_NAME = "name";

    public static final String COL_START_TIME = "start_time";

    public static final String COL_END_TIME = "end_time";

    public static final String COL_AMOUNT = "amount";

    public static final String COL_ACTIVE = "active";

    public static final String COL_LOGO = "logo";

    public static final String COL_DESCRIPTION = "description";

    public static final String COL_EXPIRE = "EXPIRE";

    public static final String COL_USER_ID = "user_id";

    public static final String COL_RULE = "rule";
}